package fr.rinie.android_first_step;

import android.text.Editable;
import android.text.TextWatcher;

/**
 * All copyright reserved.
 * User: romain
 * Date: 11/20/13
 * Time: 9:36 PM
 * Please contact romain.rinie@xcom.de before any modification/distribution.
 */
public class MyTextWatcher implements TextWatcher {
    private FishAdapter arrayAdapter;

    public MyTextWatcher(FishAdapter arrayAdapter) {
        this.arrayAdapter = arrayAdapter;
    }

    @Override
    public void beforeTextChanged(CharSequence s, int start, int count, int after) {
    }

    @Override
    public void onTextChanged(CharSequence cs, int start, int before, int count) {
        arrayAdapter.getFilter().filter(cs);
    }

    @Override
    public void afterTextChanged(Editable s) {
    }
}
